//
//  MCUserCacheInfoManager.h
//  QuKeClient
//
//  Created by delicious on 2018/1/23.
//  Copyright © 2018年 delicious. All rights reserved.
//

#import <Foundation/Foundation.h>
@class MCInfoCache;
typedef void(^infoCacheModel)(MCInfoCache*infoCache);


@interface MCInfoCache : NSObject
@property(nonatomic,copy)NSString* user_id;
@property(nonatomic,copy)NSString* nickname;
@property(nonatomic,copy)NSString* avatar_img;
@property(nonatomic,copy)NSString* group_chat_id;
@end



@interface MCInfoCacheManager : NSObject

+(void)saveInfo:(NSString *)openId imgId:(NSString*)imgId nickName:(NSString*)nickName;

+(void)saveInfo:(NSString *)openId
          imgId:(NSString*)imgId
       nickName:(NSString*)nickName
        groupId:(NSString*)groupId;

+(void)saveDict:(NSDictionary *)userinfo;

+(void)saveModel:(id)user;

+(BOOL)updateImgId:(NSString*)imgId Userid:(NSString *)userid;

+(BOOL)updateNickName:(NSString*)nickName  Userid:(NSString *)userid;

+(MCInfoCache*)queryById:(NSString *)userid;
+(void)queryById:(NSString *)userid queryModel:(infoCacheModel)queryModel;
+(void)onCleanTable;
@end


